You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use the private AX root frame as the fallback viewport before querying app.frame. This avoids an avoidable public XCTest query inside the private AX recovery path, which can record a failure and force the runner to relaunch after an otherwise successful fallback snapshot.
Scope: 1 Swift runner file. This is stacked on fix/ios-snapshot-private-ax-recovery.
Validation
Ran pnpm build:xcuitest; XCTest runner build passed. Prior physical-device probing on thymikee-iphone showed Bluesky private AX fallback warm snapshots avoiding runner restart when the private AX root frame path is used.
🤖 Automated review (Claude Code). Stacked on fix/ios-snapshot-private-ax-recovery.
Overview
In the private-AX fallback, use the private AX root frame as the primary viewport and only call safeSnapshotViewport(app:) (which queries app.frame — a public XCTest query that can record a failure and force a runner relaunch) when the root frame is empty. This inverts the previous precedence (app frame primary, root frame fallback).
Looks good
Minimal and well-scoped; it directly removes the avoidable public query on the success path, matching the stated goal and the validated Bluesky physical-device behavior.
Two small notes
Stale comment. The leading comment ("If the app frame is unavailable, the private root's own frame is the reliable screen rect here") now describes the old precedence — the new code uses rootFrame unconditionally when non-empty and never consults app.frame first. Suggest: "Prefer the private root's own frame as the screen rect; fall back to the public app-frame query only when the root frame is empty."
Precedence inversion — sanity-check beyond Bluesky. Previously app.frame won when both were valid; now a non-empty rootFrame always wins. If any app's private AX root frame is a sub-region rather than the full screen, downstream viewport inference shifts. Validated on Bluesky, so fine to ship — just flagging the inversion for other deep RN apps.
Addressed the stale comment: it now describes the new precedence explicitly, preferring the private AX root frame and falling back to the public app-frame query only when the root frame is empty. The precedence inversion is intentional for this PR; the fallback remains sparse-checked and quality-stamped by the existing capture plan.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Use the private AX root frame as the fallback viewport before querying
app.frame. This avoids an avoidable public XCTest query inside the private AX recovery path, which can record a failure and force the runner to relaunch after an otherwise successful fallback snapshot.Scope: 1 Swift runner file. This is stacked on
fix/ios-snapshot-private-ax-recovery.Validation
Ran
pnpm build:xcuitest; XCTest runner build passed. Prior physical-device probing onthymikee-iphoneshowed Bluesky private AX fallback warm snapshots avoiding runner restart when the private AX root frame path is used.